package cn.zzz.openplatform.amap.model;

import cn.zzz.openplatform.common.model.OpenApiCredentials;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@ToString
public class AmapCredentials implements OpenApiCredentials {
    private final String key;
    private final String sig;
    private double weight = 1.0; // 默认权重
    private boolean enabled = true; // 启用状态
    private int errorCount = 0; // 错误计数（用于熔断）

    public AmapCredentials(String key) {
        this(key, null);
    }

    public AmapCredentials(String key, String sig) {
        this.key = key;
        this.sig = sig;
    }
}
